import request from '@/utils/request.js'

export const userInfo = () => {
  return request({
    url: '/v1_0/user/profile'
  })
}

// 编辑用户信息接口
export const editProfile = (data) => {
  return request({
    url: '/v1_0/user/profile',
    method: 'PATCH',
    data
  })
}

// 编辑头像的接口
export const editPhoto = (data) => {
  return request({
    url: '/v1_0/user/photo',
    method: 'PATCH',
    data
  })
}

// 关注用户
export const followUser = (data) => {
  return request({
    url: '/v1_0/user/followings',
    method: 'post',
    data
  })
}
// 取关用户
export const unfollowUser = (id) => {
  return request({
    url: '/v1_0/user/followings/' + id,
    method: 'delete'
  })
}
